package com.hsy.crm.web.web.stone;

import com.hsy.crm.web.domain.cm.Response;
import com.hsy.crm.web.domain.entity.CostOrder;
import com.hsy.crm.web.domain.vo.costOrder.CostOrderPageVo;
import com.hsy.crm.web.domain.vo.costOrder.CostVo;
import com.hsy.crm.web.service.impl.CostOrderService;
import com.hsy.crm.web.web.BaseAction;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/costOrder")
public class CostOrderAction extends BaseAction {

    @Autowired
    CostOrderService costOrderService;

    @RequestMapping("/insert")
    public String insert(CostVo costVo) {
        return Response.body(costOrderService.insert(costVo));
    }

    @RequestMapping("/update")
    public String update(CostVo costVo) {
        return Response.body(costOrderService.update(costVo));
    }

    @RequestMapping("/delete")
    public String delete(CostOrder costOrder) {
        return Response.body(costOrderService.delete(costOrder));
    }

    @RequestMapping("/examine")
    public String examine(CostOrder order) {
        return Response.body(costOrderService.examine(order));
    }

    @RequestMapping("/doInvalid")
    public String doInvalid(CostOrder order) {
        return Response.body(costOrderService.doInvalid(order));
    }

    @RequestMapping("/getOrder")
    public String get(CostOrder order) {
        return Response.body(costOrderService.getOrder(order));
    }

    @RequestMapping("/page")
    public String page(CostOrderPageVo costOrderPageVo) {
        return Response.body(costOrderService.page(costOrderPageVo));
    }

}
